home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / dev / c / ExtrasLib.lha / ExtrasLib / Source / FindLine.c < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-30  |  652 b   |  49 lines

  1. #include <string.h>
  2.  
  3. #include <clib/extras_protos.h>
  4. #include <proto/dos.h>
  5. #include <proto/exec.h>
  6.  
  7. /****** extras.lib/FindLine ******************************************
  8. *
  9. *   NAME
  10. *       FindLine - find the next matching line in a file.
  11. *
  12. *   SYNOPSIS
  13. *
  14. *
  15. *
  16. *
  17. *
  18. *
  19. *   FUNCTION
  20. *
  21. *
  22. *   INPUTS
  23. *
  24. *   RESULT
  25. *
  26. *   EXAMPLE
  27. *
  28. *   NOTES
  29. *
  30. *   BUGS
  31. *
  32. *   SEE ALSO
  33. *
  34. ******************************************************************************
  35. *
  36. */
  37.  
  38.  
  39. LONG FindLine(BPTR File, STRPTR Name, STRPTR Buffer, ULONG BufferSize)
  40. {
  41.   while(FGets(File,Buffer,BufferSize))
  42.   {
  43.     Strip(Buffer);
  44.     if(stricmp(Buffer,Name)==0)
  45.       return(1);
  46.   }
  47.   return(0);
  48. }
  49.